package thread;

public class ThreadDemo1  {
    public static void main(String[] args){
        Thread myThread1 = new MyThread1();
        Thread myThread2 = new MyThread2();
        myThread1.start();
        myThread2.start();
    }
}
class MyThread1 extends Thread{
    @Override
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println("1111");
        }
    }
}
class MyThread2 extends Thread{
    @Override
    public void run(){
        for (int i = 0; i < 100; i++) {
            System.out.println("2222");
        }
    }
}